package com.egoo.ticket.server.dao;

import com.egoo.ticket.server.pojo.dto.WorkOrderTriggerInfoDto;
import com.egoo.ticket.server.pojo.entity.WorkOrderTriggerInfo;
import com.egoo.ticket.server.pojo.vo.WorkOrderTriggerInfoVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * @author Administrator
 */
@Component
public interface WorkOrderTriggerInfoDao {
	/**
	 * 获取触发器列表
	 * @param workOrderTriggerInfoDto
	 * @return
	 */
	List<WorkOrderTriggerInfoVo> selectByCondition(WorkOrderTriggerInfoDto workOrderTriggerInfoDto);

	/**
	 * 查询对应主键的触发器信息
	 * @param id
	 * @return
	 */
	WorkOrderTriggerInfoVo selectByPrimaryKey(String id);

	/**
	 * 删除
	 * @param id
	 * @return
	 */
    int deleteByPrimaryKey(String id);
	/**
	 * TODO 动态删除
	 * @author: victor_tang
	 * @createtime: 2020/5/12 17:36
	 * @param map 1
	 * @return: int
	 */
	int deleteByConditon(Map<String, Object> map);

	/**
	 * 插入
	 * @param record
	 * @return
	 */
    int insert(WorkOrderTriggerInfo record);

	/**
	 * 动态插入
	 * @param record
	 * @return
	 */
    int insertSelective(WorkOrderTriggerInfo record);

	/**
	 * 动态更新
	 * @param record
	 * @return
	 */
    int updateByPrimaryKeySelective(WorkOrderTriggerInfo record);

	/**
	 * 更新
	 * @param record
	 * @return
	 */
    int updateByPrimaryKey(WorkOrderTriggerInfo record);

	/**
	 * 批量更新
	 * @param updateMap
	 * @return
	 */
	int batchUpdateByPrimaryKeySelective(Map<String, Object> updateMap);

	WorkOrderTriggerInfoVo selectByNameAndTypeId(@Param("triggerName") String triggerName,
												 @Param("workOrderTypeId") String workOrderTypeId);
}